package cn.choujay.tlias.mapper;


import cn.choujay.tlias.domain.Emp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

/**
 * @author Ye
 * @description 针对表【emp(员工表)】的数据库操作Mapper
 * @createDate 2023-05-20 20:52:38
 * @Entity cn.choujay.tlias.domain.Emp
 */
@Mapper
public interface EmpMapper {
    Emp getByIdEmp(String username);


    //分页查询 联查
    List<Emp> getAllEmp();

    Boolean addEmp(Emp emp);

    Boolean updateEmp(Emp emp);

    List<Emp> Search(@Param(value = "name") String name, @Param(value = "gender") Integer gender, @Param(value = "start") Date start, @Param(value = "end") Date end);

    @Transactional
    Boolean deleteEmp(@Param(value = "ids") Integer[] ids);


}